package com.gcd.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gcd.mapper.MyCourseMapper;
import com.gcd.model.form.CourseOfMember;
import com.gcd.service.MyCoursesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MyCoursesServiceImpl implements MyCoursesService {
    private MyCourseMapper myCourseMapper;

    @Autowired
    public void setMyCourseMapper(MyCourseMapper myCourseMapper) {
        this.myCourseMapper = myCourseMapper;
    }

    @Override
    public Page<CourseOfMember> getMyCourses(Integer memberId, Page<CourseOfMember> page,CourseOfMember courseOfMember) {
        return myCourseMapper.getMyCourses(memberId, page,courseOfMember);
    }

    @Override
    public boolean changeReserve(CourseOfMember courseOfMember) {
        return myCourseMapper.changeReserve(courseOfMember)==1;
    }
}
